﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SugarWebApi
{


	internal class Trace
	{

		internal static void Debug(string message)
		{
			TraceInner(TraceType.Debug, message);
		}

		internal static void Debug(string format, params object[] parameters)
		{
			Tracef(TraceType.Debug, format, parameters);
		}

		internal static void Tracef(TraceType type, string format, params object[] parameters)
		{
			TraceInner(type, string.Format(format, parameters));
		}


		internal static void TraceInner(TraceType type, string message)
		{
			string output = string.Format("{0:HH:mm:ss}\t{1}", DateTime.Now, message);
			switch (type)
			{
				case TraceType.Debug:
					System.Diagnostics.Debug.WriteLine(output);
					break; ;
			}
		}

	}

	internal enum TraceType
	{
		Debug = 1,
		Default = Debug
	}

}
